URL Encoder / Decoder

Convert text to percent-encoding or decode it back

Encoded result

What this tool does

Enter text or a URL to convert it into percent-encoding (forms like %EA%B0%80), or turn an already encoded string back into readable characters. Choose encode or decode from the tabs at the top; the result updates as you type, and the copy button grabs it instantly. Use it when an address bar is full of % signs, when a link or search URL value needs non-ASCII letters, spaces or symbols, or when you need to read an encoded URL from a log or analytics tool.

How it is calculated

Encoding uses the browser's built-in encodeURIComponent as is. Every character except Latin letters, digits and - _ . ! ~ * ' ( ) is converted to UTF-8 bytes, and each byte is written as % plus two hex digits. So a 3-byte Korean syllable (U+AC00) becomes %EA%B0%80, a space %20, ? becomes %3F, & %26 and / %2F. For example, 'café au lait' becomes caf%C3%A9%20au%20lait. Decoding first turns + into a space and then applies decodeURIComponent. If a % is not followed by two valid hex digits or the bytes do not form valid UTF-8, a red error message appears in the result box and the copy button does nothing. All conversion happens in your browser and nothing is sent to a server.

  • Pick the encode or decode tab at the top. Switching tabs keeps your input and reconverts it immediately.
  • Paste the text or address into the input box.
  • The result appears live in the box below.
  • Press copy to put the result on the clipboard; the button briefly shows 'Copied!'.
  • If decoding fails, check whether the string was cut off or contains a stray %.

Things to know

  • Encoding a whole address also converts :// and / ? = &, so it stops working as a link. The sample text that loads with the page shows exactly this. In practice, encode only the value part, such as what follows ?q=.
  • Decoding reads + as a space. That suits form-style strings, but a value that contained a literal + will turn into a space.
  • Encoding writes spaces as %20, not +. Most servers and browsers accept both as a space.
  • Encoding an already encoded string turns % into %25, creating double encoding. If you see lots of %25, try decoding twice.
  • Emoji are 4 bytes and grow into 12 characters starting with %F0. Keep that in mind where URL length is limited.
  • Plain ASCII letters and digits barely change. An unchanged result does not mean it failed.

Frequently asked questions

My copied link is full of things like %EA%B0. Is it broken?

No. Non-ASCII characters have been percent-encoded by the rules. Paste it into the decode tab to see the original, and browsers open the encoded address normally.

What is the difference between encodeURI and encodeURIComponent?

encodeURI keeps structural characters like : / ? # & for use on a whole address, while encodeURIComponent converts them too for use on a single value. This tool uses the latter, which suits a search term or one parameter value.

Decoding gives an error.

Either a % is followed by something other than two hex digits, or a multibyte character was cut partway. Check that the end of the string is intact and that no unencoded % is mixed in.

Is my input saved or sent?

No. Conversion happens only in your browser and the page has no code that sends it anywhere. Your input disappears when you close the page.

← na.to home